Finding long simple paths in a weighted digraph using pseudo-topological orderings
نویسنده
چکیده
Given a weighted digraph D, finding the longest simple path is well known to be NPhard. Furthermore, even giving an approximation algorithm is known to be NP-hard. In this paper we describe an efficient heuristic algorithm for finding long simple paths, using an hybrid approach of DFS and pseudo-topological orders, a a generalization of topological orders to non acyclic graphs, via a process we call “opening edges”. An implementation of this algorithm won the Oracle MDC 2015 coding competition.
منابع مشابه
A matrix-based approach to searching colored paths in a weighted colored multidigraph
An algebraic approach to finding all edge-weighted-colored paths within a weighted colored multidigraph is developed. Generally, the adjacency matrix represents a simple digraph and determines all paths between any two vertices, and is not readily extendable to colored multidigraphs. To bridge the gap, a conversion function is proposed to transform the original problem of searching edge-colored...
متن کاملSubgraphs Satisfying MSO Properties on z-Topologically Orderable Digraphs
We introduce the notion of z-topological orderings for digraphs. We prove that given a digraph G on n vertices admitting a z-topological ordering, together with such an ordering, one may count the number of subgraphs of G that at the same time satisfy a monadic second order formula φ and are the union of k directed paths, in time f(φ, k, z) · n. Our result implies the polynomial time solvabilit...
متن کاملSubcubic Equivalence of Triangle Detection and Matrix Multiplication
• The all-pairs shortest paths problem on weighted digraphs (APSP). • Detecting if a weighted graph has a triangle of negative total edge weight. • Listing up to n2.99 negative triangles in an edge-weighted graph. • Finding a minimum weight cycle in a graph of non-negative edge weights. • The replacement paths problem on weighted digraphs. • Finding the second shortest simple path between two n...
متن کاملTopological orderings of weighted directed acyclic graphs
We call a topological ordering of a weighted directed acyclic graph non-negative if the sum of weights on the vertices in any prefix of the ordering is non-negative. We investigate two processes for constructing non-negative topological orderings of weighted directed acyclic graphs. The first process is called a mark sequence and the second is a generalization called a mark-unmark sequence. We ...
متن کاملFinding the k Shortest Paths
We give algorithms for finding the k shortest paths (not required to be simple) connecting a pair of vertices in a digraph. Our algorithms output an implicit representation of these paths in a digraph with n vertices and m edges, in time O(m + n log n + k). We can also find the k shortest paths from a given source s to each vertex in the graph, in total time O(m+ n log n+ kn). We describe appli...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1609.07450 شماره
صفحات -
تاریخ انتشار 2016